package cn.jksoft.businessclient.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cn.jksoft.businessclient.R;
import cn.jksoft.businessclient.base.BaseFragment;
import cn.jksoft.businessclient.ui.activity.FastCreateOrderActivity;
import cn.jksoft.businessclient.ui.activity.OnlineOrderActivity;
import cn.jksoft.businessclient.ui.activity.CreateOrderActivity;

/**
 * Author:  nick
 * Email:   nickdevp@gmail.com
 * Date:    16/04/07
 * Description:
 */
public class ServiceFragment extends BaseFragment implements View.OnClickListener {

    @Bind(R.id.ll_service_billing)
    LinearLayout llServiceBilling;

    @Bind(R.id.ll_service_online_order)
    LinearLayout llServiceOnlOrder;

    @Override
    public View onCreateView(LayoutInflater inflater,
                              ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_service, container,
                false);
        ButterKnife.bind(this, view);
        return view;
    }


    @Override
    @OnClick({R.id.ll_service_billing, R.id.ll_service_online_order,R.id.ll_fast_create})
    public void onClick(View v) {

        switch (v.getId()) {
            case R.id.ll_service_billing:
                readyGo(CreateOrderActivity.class);
                break;
            case R.id.ll_service_online_order:
                readyGo(OnlineOrderActivity.class);
                break;
            case R.id.ll_fast_create:
                readyGo(FastCreateOrderActivity.class);
                break;
            default:
                break;
        }

    }
}
